<%@ page import="AdminController.AdminMem.AdminBean" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%
 AdminBean adminmain[] = (AdminBean[])request.getAttribute("adminmain");
 String search = null;
 String value = null;
 String code = null;
 String select = "selected='selected'";
 String select2 = null;
 String select3 = null;
 
 if((String)request.getAttribute("search") != null){
	 search = (String)request.getAttribute("search");
	 value = (String)request.getAttribute("value");
	 
	 if(search.equals("check")){
		 select = "";
		 select2 = "selected='selected'";
		 select3 = "";
	 }else if(search.equals("mypage")){
		 select = "";
		 select2 = "";
		 select3 = "selected='selected'";
	 }
	 
	 if(value.equals("null")){
		 code = ("<select name='mypagevalue' class='area'>" +
					"<option value='no' selected='selected'>-無-</option>" +
					"<option value='yes'>-共有中-</option>" +
					"</select>");
	 }else if(value.equals("true")){
		 code = ("<select name='mypagevalue' class='area'>" +
					"<option value='no'>-無-</option>" +
					"<option value='yes' selected='selected'>-運営中-</option>" +
					"</select>");
	 }else if(value.equals("1")){
		 code =("<select name='checkvalue' class='area'>" +
					"<option value='1' selected='selected'>受付 待機</option>" +
					"<option value='2'>受付 取り消す</option>" +
					"<option value='3'>承認待機</option>" +
					"<option value='5'>受付成立</option>" +
					"</select>");
		 
	 }else if(value.equals("2")){
		 code =("<select name='checkvalue' class='area'>" +
					"<option value='1'>受付 待機</option>" +
					"<option value='2' selected='selected'>受付 取り消す</option>" +
					"<option value='3'>承認待機</option>" +
					"<option value='5'>受付成立</option>" +
					"</select>");
		 
	 }else if(value.equals("3")){
		 code =("<select name='checkvalue' class='area'>" +
					"<option value='1'>受付 待機</option>" +
					"<option value='2'>受付 取り消す</option>" +
					"<option value='3' selected='selected'>承認待機</option>" +
					"<option value='5'>受付成立</option>" +
					"</select>");
		 
	 }else if(value.equals("5")){
		 code =("<select name='checkvalue' class='area'>" +
					"<option value='1'>受付 待機</option>" +
					"<option value='2'>受付 取り消す</option>" +
					"<option value='3'>承認待機</option>" +
					"<option value='5' selected='selected'>受付成立</option>" +
					"</select>");
	 }
		
 }
 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="STYLESHEET" type="text/css" href="/KOMORIUTA/Manage/Css/Manage.css">
<link rel="STYLESHEET" type="text/css" href="/KOMORIUTA/page/page.css">
<script src="/KOMORIUTA/Manage/jquery.js" type="text/javascript"></script>
<script src="/KOMORIUTA/Manage/manage.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<form id="people"  method="post" action="/KOMORIUTA/AdminMem.do?action_code=oldlist">
	<input type="hidden" id="currentPage" name="currentPage" />
	<input type="hidden" id="age" value="old" />
		<table width="97%" border="0" style="margin-left: 20px" class="size">
			<tr>
				<td width="44%" >提供会員<hr></td>
				<td></td>
				<td width="44%" align="center">
					<select id="search" name="search" onchange="change(this)">
						<option value="all" <%=select%>>全体</option>
						<option value="id">ID</option>
						<option value="check" <%=select2%>>受付状態</option>
						<option value="mypage" <%=select3%>>Mypage状態</option>
					</select>
					<label id="input" >
						<%if(code != null){%><%=code%><%} %>
					</label>
					<input type="submit" class="btn_Search" value="検索" />
				</td>
			</tr>
			<tr>
				<td>
					<table width="100%" border="1" cellspacing="0" cellpadding="0">
			  			<tr> 
						    <td width="50px" height="40"><div align="center">会員番号</div></td>
						    <td width="70px"><div align="center">ID</div></td>
						    <td width="115px"><div align="center">受付状態</div></td>
						    <td width="115px"><div align="center">Mypage状態</div></td>
			  			</tr>
						<% for(int i=0; i<adminmain.length; i++){ 
							String condition = "受付内訳無";
							String mypage = "無";
							if(adminmain[i].getCheck() == 1){
								condition = "<label class='waiting1'>「受付 待機」</label>";
							}else if(adminmain[i].getCheck() == 2){
								condition = "<a href=javascript:delet('"+adminmain[i].getID()+"') class='read'>受付取り消す</a>";
							}else if(adminmain[i].getCheck() == 3){
								condition = "<label class='waiting2'>[承認待機]</label>";
							}else if(adminmain[i].getCheck() == 5){
								condition = "<a href=javascript:business('"+adminmain[i].getID()+"') class='black'>受付成立</a>";
							}
							if(adminmain[i].getBlogs_Id() != 0){
								mypage = "<a href=javascript:oldMypage('"+adminmain[i].getID()+"','"+adminmain[i].getMem_Nick()+"') class='black'>-共有中-</a>";
							}
						%>
			  			<tr> 
						    <td height="30"><div align="center"><%=adminmain[i].getID() %></div></td>
						    <td><div align="center"><%=adminmain[i].getMem_Nick() %></div></td>
						    <td><div align="center"><%=condition %></div></td>
						    <td><div align="center"><%=mypage %></div></td>
			  			</tr>
						<% } %>
				</table>
			</td>
			<td width="2%" >
			</td>
			<td id="table" align="center">
				
			</td>
		</tr>
	</table>
	<table width="100%">
		<tr align="center">
			<td><%=request.getAttribute("paging") %></td>
		</tr>
	</table>
</form>
</body>
</html>